package com.zdp.controller;

import com.zdp.domain.Share;
import com.zdp.domain.dto.ShareAuditDTO;
import com.zdp.service.ShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author sesshomaru
 * @date 2021/10/10 16:43
 */
@RestController
@RequestMapping("/admin/shares")
public class ShareAdminController {

    @Autowired
    private ShareService shareService;

    @PutMapping("/audit/{id}")
    public Share auditById(@PathVariable Integer id, @RequestBody ShareAuditDTO shareAuditDTO) {
        // TODO 认证和授权
        return  shareService.auditById(id, shareAuditDTO);
    }
}
